/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author WinKiQue58
 */
@Embeddable
public class ConsolidatedPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CONSOLIDATED")
    private BigInteger idConsolidated;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CLOSURE")
    private BigInteger idClosure;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_WAREHOUSE")
    private BigInteger idWarehouse;

    public ConsolidatedPK() {
    }

    public ConsolidatedPK(BigInteger idConsolidated, BigInteger idClosure, BigInteger idWarehouse) {
        this.idConsolidated = idConsolidated;
        this.idClosure = idClosure;
        this.idWarehouse = idWarehouse;
    }

    public BigInteger getIdConsolidated() {
        return idConsolidated;
    }

    public void setIdConsolidated(BigInteger idConsolidated) {
        this.idConsolidated = idConsolidated;
    }

    public BigInteger getIdClosure() {
        return idClosure;
    }

    public void setIdClosure(BigInteger idClosure) {
        this.idClosure = idClosure;
    }

    public BigInteger getIdWarehouse() {
        return idWarehouse;
    }

    public void setIdWarehouse(BigInteger idWarehouse) {
        this.idWarehouse = idWarehouse;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idConsolidated != null ? idConsolidated.hashCode() : 0);
        hash += (idClosure != null ? idClosure.hashCode() : 0);
        hash += (idWarehouse != null ? idWarehouse.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ConsolidatedPK)) {
            return false;
        }
        ConsolidatedPK other = (ConsolidatedPK) object;
        if ((this.idConsolidated == null && other.idConsolidated != null) || (this.idConsolidated != null && !this.idConsolidated.equals(other.idConsolidated))) {
            return false;
        }
        if ((this.idClosure == null && other.idClosure != null) || (this.idClosure != null && !this.idClosure.equals(other.idClosure))) {
            return false;
        }
        if ((this.idWarehouse == null && other.idWarehouse != null) || (this.idWarehouse != null && !this.idWarehouse.equals(other.idWarehouse))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.ConsolidatedPK[ idConsolidated=" + idConsolidated + ", idClosure=" + idClosure + ", idWarehouse=" + idWarehouse + " ]";
    }
    
}
